/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CancelablePromise } from '../core/CancelablePromise'
import { OpenAPI } from '../core/OpenAPI'
import { request as __request } from '../core/request'
import { useStore } from '@/store'

export class loginmodel {
  /**
   * 登录
   * @returns string OK
   * @throws ApiError
   */
  public static login(data): CancelablePromise<string> {  // 登录
    let store = useStore()
    return __request(OpenAPI, {
      method: 'POST',
      url: '/api/login/account',
      formData: data,
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static register(data): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'POST',
      url: '/api/Login/registers',
      formData: data,
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  
  public static bindkey(data): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'POST',
      url: '/api/Login/bindkey',
      formData: data,
      headers: { token: localStorage.getItem('token') },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
}
export class homemodel {
  /**
   * 来源图标
   * @returns string OK
   * @throws ApiError
   */
  
  public static userinfoapi(): CancelablePromise<string> {  // 个人信息
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/user/userinfo',
      headers: { token: localStorage.getItem('token') },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static homeindex(): CancelablePromise<string> {  // 首页接口
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/index',
      headers: { },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static userconfigapi(): CancelablePromise<string> {  // 配置
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/config',
      headers: { },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static answerlist(): CancelablePromise<string> {  // 问题列表
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/Answer/lists',
      headers: { },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static submitAnswerapi(): CancelablePromise<string> {  // 问题列表
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/submitAnswer',
      headers: { token: localStorage.getItem('token') },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  
  // 
  public static logoList(): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/getLogoList',
      headers: { token: localStorage.getItem('token') },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static videoList(data): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/getVideoList?page=' + data.page,
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static mineListapi(): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/getMine',
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static withdrawalRulesapi(): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/withdrawalRules',
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static withdrawalapi(data): CancelablePromise<string> {  // 体现
    let store = useStore()
    return __request(OpenAPI, {
      method: 'POST',
      url: '/api/index/withdrawal',
      formData: data,
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static submitcode(data): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'POST',
      url: '/api/index/submit',
      formData: data,
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
  public static getWebList(data): CancelablePromise<string> {
    let store = useStore()
    return __request(OpenAPI, {
      method: 'GET',
      url: '/api/index/getWebList',
      formData: data,
      headers: {
        token: localStorage.getItem('token')
      },
      errors: {
        401: `Unauthorized`,
        403: `Forbidden`,
        404: `Not Found`
      }
    })
  }
}
